<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<head>
<meta name="menu" content="assetMenu" />
<meta name="nav" content="1" />
<meta name="acc" content="0-2-1" />
<title>图书借阅管理</title>
<script>

$(document).ready(function() {
	 $("#lendDate").addClass("Wate").bind("click", function(){
	 WdatePicker({skin:'whyGreen',minDate:'1900-10-01',maxDate:'%y-%M-%d' , dateFmt:'yyyy-MM-dd'});});
	 $("#returnDate").addClass("Wate").bind("focus", function(){
		 WdatePicker({skin:'whyGreen',minDate:'1900-10-01',maxDate:'%y-%M-%d' , dateFmt:'yyyy-MM-dd'});});
});		
</script>
</head>
<body>
<div id="heading" class="book"><h6>图书借阅列表</h6></div>
<div id="message"><s:actionmessage theme="custom"
	cssClass="success" /></div>
<form id="mainForm" action="${ctx }/asset/book/lend.action" method="get" class="yform">
<div id="filter">
<ul>
<li>图书类别:<pt:code  category="2023" name="filter_LIKES_bksn.bookinfo.bookType" prompt="全部" default="${param['filter_LIKES_bksn.bookinfo.bookType'] }"></pt:code>
</li>
<li>图书名称:<input type="text" name="filter_LIKES_bksn.bookinfo.bookName" value="${param['filter_LIKES_bksn.bookinfo.bookName']}" /></li>
<li>借阅时间:<input type="text" id="lendDate" name="filter_GED_lendDate" value="${param['filter_GED_lendDate']}" /></li>
<li>归还时间:<input type="text" id="returnDate" name="filter_LED_returnDate" value="${param['filter_LIKES_returnDate'] }"/></li>
</ul>
<div class="type-button"><input type="button" onclick="search();" class="search" value="查询"/></div>	
</div>
<div id="content">
<table id="contentTable">
	<tr>
		<th><a id="createDate" href="javascript:sort('createDate','asc')">序号</a></th>
		<th><a id="bksn.bookinfo.bookName" href="javascript:sort('bksn.bookinfo.bookName','asc')">图书名称</a></th>
		<th><a id="lendPerson" href="javascript:sort('lendPerson','asc')">借阅人</a></th>
		<th><a id="lendDate" href="javascript:sort('lendDate','asc')">借阅时间</a></th>
		<th><a id="returnDate" href="javascript:sort('returnDate','asc')">归还时间</a></th>
		<th>操作</th>
	</tr>
	<c:forEach items="${page.result}" var="lend" varStatus="status">
		<tr>
			<td>${page.first+status.index }</td>
			<td>${lend.bksn.bookinfo.bookName}</td>
			<td>${lend.lendPerson}</td>
			<td>${lend.lendDate}</td>
			<td>${lend.returnDate}</td>
			<td><a
				href="${ctx}/asset/book/lend/lend!input.action?id=${lend.id}">编辑</a>
			<a href="${ctx}/asset/book/lend!delete.action?id=${lend.id}" onclick="return confirmDelete();">删除</a></td>
		</tr>
	</c:forEach>
</table>
</div>
<jsp:include page="/common/page.jsp" flush="true" />
<div class="type-button"><input onclick="location.href='${ctx}/asset/book/lend!input.action'" type="button" class="submit" value="新增" /></div>
</form>
</body>
